<template>
  <el-config-provider :locale="locale" :size="size">
    <router-view/>
  </el-config-provider>
</template>

<script setup>
import useSettingsStore from '@/store/modules/settings'
import {handleThemeStyle} from '@/utils/theme'
import Cookies from 'js-cookie'
import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言
const size = computed(() => Cookies.get('size') || 'default')

onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme)
  })
})
</script>
